package lmscript.postscript.syntax;

public class PSString extends PSComposite {

	private String text;

	public PSString(String text) {
		super("string", PSObject.LITERAL);
		this.text = text;
	}

	public String getText() {
		return this.text;
	}

	public String toString() {
		return this.text;
	}

	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj != null && obj instanceof PSString) {
			if (((PSString) obj).text == this.text) {
				return true;
			}
		}
		return false;
	}
	
	public int hashCode() {
		return this.text.hashCode();
	}
}
